﻿Public Class Login
    Inherits Datos

    Public Function LoginOK(ByVal usuario As String _
                            , ByVal pass As String) As Integer
        Dim ds As New DataSet
        Dim parametrosSQL As New ArrayList
        Dim parametrosVB As New ArrayList
        parametrosSQL.Add("@paramUsuario")
        parametrosSQL.Add("@paramPass")
        parametrosVB.Add(usuario.ToString)
        parametrosVB.Add(pass.ToString)
        ds = Me.ObtenerSelect("loginOk", "loginCliente" _
                              , parametrosSQL, parametrosVB)
        If ds.Tables(0).Rows.Count = 1 Then
            If ds.Tables(0).Rows(0)("ID_ESTADO") = 2 Then
                Return 1
            Else
                Return 2
            End If
        Else
            Return 0
        End If

    End Function
End Class
